package com.yuntuzhilian.chapter4.demo2;

/**
 * @author MrWang-shuizhishuiheshui
 * @description 通过继承Thread类实现子线程创建
 */
public class MyThread extends Thread {
    /**
     * 重写父类方法
     */
    @Override
    public void run() {
        Thread thread = Thread.currentThread();
        for (int i = 0; i < 10; i++) {
            System.out.println(thread.getName()+"*******"+i);
        }

    }
}
